package com.landian.commons.base.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 分页信息
 * @author caojl
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageVO implements Page, Serializable {

    public static PageVO newInstance(int page, int size){
        return newInstance(page, size, "", "");
    }

    public static PageVO newInstance(int page, int size, String sortOrder, String sortName){
        return new PageVO(page, size, sortOrder, sortName);
    }

    /**
     * 第几页
     */
    private Integer page;

    /**
     * 分页大小
     */
    private Integer size;

    /**
     * 排序规则
     */
    private String sortOrder;

    /**
     * 排序属性
     */
    private String sortName;
}
